package chat;

import chat.data.ChatState;
import chat.network.SocketClient;
import chat.protocol.ChatProtocol;
import chat.userInterface.ChatUI;

public class Chat {
	private SocketClient client;
	private ChatUI view;
	private ChatProtocol protocol;
	private ChatState state;
	
	public Chat(SocketClient c, ChatUI UI, ChatProtocol p, ChatState s) {
		client = c;
		view = UI;
		protocol = p;
		state = s;
		
		client.addProtocol(protocol);
		protocol.addClient(client);
		protocol.addState(state);
		
		state.addObserver(view);
	}
}
 